package Dao;


import Pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper {

    //    检查账户密码正确
    @Select("select * from user where username = #{username} and password  = #{password}")
    User check(@Param("username") String username, @Param("password") String password);

    //    添加用户
    @Insert("insert into user (username,password,phone) values (#{username} ,#{password},#{phone})")
    int adduser(User user);
//    统计用户信息
    @Select("SELECT * FROM user ORDER BY id;")
    List<User> finduserinfo();

}
